package com.p2p.backend.controller.form;

import org.apache.commons.lang3.StringUtils;


/**
 * leiwen@yiqihao.com
 */
public class RoleForm {

	private Integer id;
	private String name;

	private String remark;

	private String privilegeStr;

	private String[] privilegeArray;

	/**
	 * 把“,”隔开的权限字符串，转换成数组
	 */
	public void strToArray(){
		if(StringUtils.isNoneBlank(privilegeStr)){
			privilegeArray=privilegeStr.split(",");
		}
	}
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String[] getPrivilegeArray() {
		return privilegeArray;
	}

	public void setPrivilegeArray(String[] privileges) {
		this.privilegeArray = privileges;
	}

	public String getPrivilegeStr() {
		return privilegeStr;
	}

	public void setPrivilegeStr(String privilegeStr) {
		this.privilegeStr = privilegeStr;
	}

}
